// index/pages/rankingList/rankingList.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    activeTab: 'current',
    rankingList: [
      { rank: 1, score: 98, points: 50, medal: "/images/gold_medal.png", name: "学霸一号" },
      { rank: 2, score: 95, points: 30, medal: "/images/silver_medal.png", name: "知识小达人" },
      { rank: 3, score: 92, points: 20, medal: "/images/bronze_medal.png", name: "学习先锋" },
      { rank: 4, score: 89, points: 10, name: "智慧之星" },
      { rank: 5, score: 87, points: 10, name: "勤奋小蜜蜂" },
      { rank: 6, score: 85, points: 5, name: "进步之星" },
      { rank: 7, score: 82, points: 5, name: "努力向上" },
      { rank: 8, score: 80, points: 5, name: "知识探索者" },
      { rank: 9, score: 78, points: 5, name: "学习小能手" },
      { rank: 10, score: 75, points: 5, name: "智慧小精灵" },
      { rank: 11, score: 72, points: 0, name: "求知者" },
      { rank: 12, score: 70, points: 0, name: "勤奋学习者" }
    ]
  },
  switchTab: function(e) {
    this.setData({
      activeTab: e.currentTarget.dataset.tab
    });
    // 这里可以添加加载不同周数据的逻辑
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})